status, ret = core.download_plugin(plugin_path, size, checksum, timestamp, plugin_download_callback)
print
if status in (core_install.PLUGIN_INSTALL_ERROR_UNABLE_TO_RECV_KEYS, core_install.PLUGIN_INSTALL_ERROR_DIGITAL_SIG_NOT_FOUND):
log.error("Digital signature file download failed. Without this file, it is not possible to authenticate and validate the plug-in prior to installation.")
cont, ans = tui.enter_yes_no("Do you still want to install the plug-in?", 'n')
if not cont or not ans:
sys.exit(0)
elif status != core_install.PLUGIN_INSTALL_ERROR_NONE:
if status == core_install.PLUGIN_INSTALL_ERROR_PLUGIN_FILE_NOT_FOUND:
desc = "Plug-in file not found (server returned 404 or similar error). Error code: %s" % str(ret)
elif status == core_install.PLUGIN_INSTALL_ERROR_DIGITAL_SIG_BAD:
desc = "Plug-in file does not match its digital signature. File may have been corrupted or altered. Error code: %s" % str(ret)
elif status == core_install.PLUGIN_INSTALL_ERROR_PLUGIN_FILE_CHECKSUM_ERROR:
desc = "Plug-in file does not match its checksum. File may have been corrupted or altered."
elif status == core_install.PLUGIN_INSTALL_ERROR_NO_NETWORK:
desc = "Unable to connect to network to download the plug-in. Please check your network connection and try again."
elif status == core_install.PLUGIN_INSTALL_ERROR_DIRECTORY_ERROR:
desc = "Unable to create the plug-in directory. Please check your permissions and try again."